import random
num = random.randint(1,100)

while True:
    guess = int(input("猜数字："))
    if guess >=1 and guess<=100:

        if guess > num :
            print ("大了")


        elif guess<num:
            print ("小了")


        elif guess==num:
            print ('恭喜中奖，本轮幸运数字为：',num)
            break
    else:
        print("请输入1~100的数字")


